From: Camila Ayres Date: Mon, 17 Feb 2025 16:20:57 +0000 (+0100) Subject: Don't display the option to change update channels when server has valid subscription. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~53^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=4b8e0f9ae34f8d31594c38a525cf98a8c6453678;p=nextcloud-desktop.git Don't display the option to change update channels when server has valid subscription. Signed-off-by: Camila Ayres --- diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index d6aec9821..d4a0aeaa4 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -326,6 +326,12 @@ void GeneralSettings::loadMiscSettings() #if defined(BUILD_UPDATER) void GeneralSettings::loadUpdateChannelsList() { ConfigFile cfgFile; + if (cfgFile.serverHasValidSubscription()) { + _ui->updateChannel->hide(); + _ui->updateChannelLabel->hide(); + return; + } + const auto validUpdateChannels = cfgFile.validUpdateChannels(); if (_currentUpdateChannelList.isEmpty() || _currentUpdateChannelList != validUpdateChannels){ _currentUpdateChannelList = validUpdateChannels; @@ -333,7 +339,6 @@ void GeneralSettings::loadUpdateChannelsList() { _ui->updateChannel->addItems(_currentUpdateChannelList); const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel()); _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0); - _ui->updateChannel->setDisabled(cfgFile.serverHasValidSubscription()); connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged); } }